<template>
    <div class="tabbar">
        <ul class="tab-warp">
            <router-link to="/recommend" tag="li" class="tabtitle">
                <div class="tabtxt">
                    <span>推荐音乐</span>
                </div>
            </router-link>
            <router-link to="/rank" tag="li" class="tabtitle">
                <div class="tabtxt">
                    <span>排行</span>
                </div>
            </router-link>
            <router-link to="/search" tag="li" class="tabtitle">
                <div class="tabtxt">
                    <span>搜索</span>
                </div>
            </router-link>
        </ul>
    </div>
</template>
<script>
export default {};
</script>
<style lang="less" scoped>
.tabbar {
    position: fixed;
    z-index: 10;
    width: 100%;
    left: 0;
    top: 0;
    background: #fff;
    .menu {
        position: absolute;
        top: 17px;
        left: 15px;
        .iconfont {
            font-size: 20px;
        }
    }
    .search {
        position: absolute;
        top: 17px;
        right: 15px;
        .iconfont {
            font-size: 20px;
        }
    }
}
.tab-warp {
    display: flex;
    background-color: #ffffff;
    border-bottom: 1px solid #eee;
    .tabtitle {
        flex-grow: 1;
        text-align: center;
        .tabtxt {
            position: relative;
            display: inline-block;
            max-width: 100%;
            height: 100%;
            padding: 0 5px;
            box-sizing: border-box;
            color: #333;
            font-size: 15px;
            line-height: 40px;
        }
    }
    .tabtitle.router-link-active {
        .tabtxt {
            color: #dd001b;
        }
        .tabtxt:after {
            content: "";
            position: absolute;
            left: 0;
            bottom: -2px;
            z-index: 3;
            width: 100%;
            height: 4px;
            -webkit-transform: scaleY(0.5);
            transform: scaleY(0.5);
            background: #dd001b;
        }
    }
    
}
</style>